/**
 * 
 */
package com.kandinfo.survey.report.controller;

import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.kandinfo.base.common.constant.ResultCode;
import com.kandinfo.base.common.dto.ResultDto;
import com.kandinfo.base.common.dto.ResultDtoFactory;

/**
 * @author tangqh
 *
 */
@Controller
@RequestMapping(value = "/report")
public class ReportController {

	/**
	 * 报表管理入口
	 */
	@RequestMapping(value = "/list", method = RequestMethod.GET)
	private String index(Model model) {
		return "views/report/patient-report-list";
	}
	/**
	 * 报表详细信息入口
	 */
	@RequestMapping(value = "/detail/{id}", method = RequestMethod.GET)
	private String detail(Model model, @PathVariable Long id) {
		return "views/report/patient-report-detail";
	}

	/**
	 * 通过ID或ID List获取数据
	 */
	@RequestMapping(value = "/get", method = RequestMethod.GET)
	private ResultDto get(Model model, @RequestParam("id")Long id, @RequestParam("idList[]")List<Long> idList) {
        return ResultDtoFactory.createResult(ResultCode.SUCCESS, "查询成功", null);
    }

}
